﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using EC_Agent.AgentClass;
namespace EC_Agent.Models
{
    public class NhanVienModels
    {
        public int CheckLogin(string Username, string Password)
        {
            int error;
            SqlParameter[] parameters = new SqlParameter[2];
            parameters[0] = new SqlParameter("@TenDangNhap", Username);
            parameters[1] = new SqlParameter("@MatKhau", Password);
            DataService ds = new DataService();
            ds.Connect();
            error = ds.ExcuteProcedureWithReturn("spNhanVien_DangNhap", parameters);
            ds.Disconnect();
            return error;
        }
    }
}